<?php

namespace app\admin\controller;

use think\facade\Request;

class Menu extends Common
{
    /**
     * @param Request $request
     * @return \think\response\Json
     * @throws \think\exception\DbException
     */
    public function index(Request $request)
    {
        $res = \app\admin\model\Menu::where([])->withSearch(['ua'], $request::param())
            ->page($request::param('page', 1), $request::param('page', 10))
        ->paginate($request::param('page', 10));
        return $this->returnJson(200, 'ok', $res);
    }

    public function update($id, Request $request)
    {

    }
}
